#ifndef ECS_FCC300_H
#define ECS_FCC300_H

//创建于2023.12.20 自动生成
#include "qglobal.h"
#include <QStringListModel>
#include "QStandardItem"
#include "CANCard/GC/ECanVci.h"
#include "selffun.h"
class ECS_FCC300
{
public:
    static void EQ_0x18F002B2(quint8 data[]);
    static void EQ_0x1820A7C1(quint8 data[]); 
    static void EQ_0x1821A7C1(quint8 data[]); 
    static void EQ_0x182FA7C1(quint8 data[]); 
    static void EQ_0x0C01C1A7_ma_read(quint8 data[]); 
    static void EQ_0x18EFA8F0_ma_read(quint8 data[]); 
    static void EQ_0x0C01C1A7_MA(); 
    static void EQ_0x18EFA8F0_MA(); 
    static void CAN_loss_rest(int count);
    static void rest_data_ma();  //控制参数复位
    static void rest_data_info();  //信息参数复位
    static void Fault_processing();  //故障处理
    static void EQ_runinfo();   //设备运行信息
    };

typedef struct ECS_FCC300_INFO
{
    QString name= "势加FCC300空压机";
    quint32 Speed;
    float temp_1;
    float temp_2;
    float Phase_Current;
    quint16 Bus_Voltage;
    float Controller_TEMP;
    float Motor_TEMP;
    quint8 Status;
    quint8 Life;
    quint8 Fault_Class;
    quint16 Fault_Code3;
    quint32 Fault_Code2;
    quint32 Fault_Code1;
    quint16 Compressor_Mode;
    quint16 Soft_Version;
    float Motor_Current;
    quint16 Motor_Voltage;
    quint16 Motor_Power;
    bool Calibration_Error;
    bool Invalid_Model;
    bool Invalid_Factory_Configuration;
    bool EEPROM_Error;
    bool H_W_Over_Current_A;
    bool H_W_Over_Current_B;
    bool H_W_Over_Current_C;
    bool DC_Link_Over_Voltage;
    bool DC_Link_Under_Voltage;
    bool WaterOvertemperature;
    bool Motor_Over_Speed;
    bool Controller_Over_Temperature;
    bool Fault_24V;
    bool BootFault;
    bool HighVoltageinterlock_fault;
    bool Heart_Beat_Fault;
    bool Motor_Over_Temperature;
    bool Motor_Speed_Below_Min;
    bool SoftwareSelfcheckFault;
    bool DriveFault;
    bool High_DC_Link;
    bool Low_DC_Link;
    bool High_Motor_Speed;
    bool Low_Motor_Speed;
    bool High_Controller_Temperature;
    bool High_Motor_Temperature;
    bool Bias_24V_Out_of_Tolerance_warning;
    bool AIR_Status_read;
    quint16 Life_read;
    quint32 AIR_Speed_Set_read;
    quint8 CapabilitySwitch_0_read;
    quint8 CapabilitySwitch_1_read;
    quint8 CapabilitySwitch_2_read;
    quint8 CapabilitySwitch_3_read;
    quint8 CapabilitySwitch_4_read;
    quint8 CapabilitySwitch_5_read;
    quint8 CapabilitySwitch_6_read;
    quint8 CapabilitySwitch_7_read;
    QStringListModel FaultListModel; //故障列表
    QStringList FaultList; //故障列表
    quint8 CAN_count;   //计数器
    quint8 CAN_count_0x1820A7C1;
    quint8 CAN_count_0x1821A7C1;
    quint8 CAN_count_0x182FA7C1;
    quint8 CAN_count_0x0C01C1A7_ma_read;
    quint8 CAN_count_0x18EFA8F0_ma_read;
}ECS_FCC300_INFO;
typedef struct ECS_FCC300_MA
{
    quint8 AIR_Status;
    quint8 Life;
    quint32 AIR_Speed_Set;
    quint8 CapabilitySwitch_0;
    quint8 CapabilitySwitch_1;
    quint8 CapabilitySwitch_2;
    quint8 CapabilitySwitch_3;
    quint8 CapabilitySwitch_4;
    quint8 CapabilitySwitch_5;
    quint8 CapabilitySwitch_6;
    quint8 CapabilitySwitch_7;
}ECS_FCC300_MA;
extern ECS_FCC300_INFO ECS_FCC300_info;
extern ECS_FCC300_MA ECS_FCC300_ma;
extern QStandardItemModel ECS_FCC300_mode_info;
extern CAN_OBJ ECS_FCC300_MA_0C01C1A7;
extern CAN_OBJ ECS_FCC300_MA_18EFA8F0;
#endif
